package com.financing.wap.dao.impl;


import java.sql.SQLException;
import java.util.List;

import org.springframework.stereotype.Repository;

import com.financing.wap.common.SqlName;
import com.financing.wap.dao.IFpShopInformationDao;
import com.financing.wap.dto.FpShopInformationDTO;
/**
 * fp_shop_information  
 *  数据访问层实现类
 * @author huqiyun
 *
 */
 
@Repository("fpShopInformationDao")
public class FpShopInformationDaoImpl extends BaseDaoImpl<FpShopInformationDTO, java.lang.Integer> implements IFpShopInformationDao {


	@Override
	public int insert(FpShopInformationDTO fpShopInformation) throws SQLException {
		return (Integer) this.sqlMapClientTemplate.insert(SqlName.FpShopInformationSql.insert, fpShopInformation);
	}

	@Override
	public void update(FpShopInformationDTO fpShopInformation) throws SQLException {
		this.sqlMapClientTemplate.update(SqlName.FpShopInformationSql.update, fpShopInformation);
	}

	@Override
	public void updateForce(FpShopInformationDTO fpShopInformation) throws SQLException {
		this.sqlMapClientTemplate.update(SqlName.FpShopInformationSql.updateForce, fpShopInformation);
	}

	@Override
	public void delete(Integer id) throws SQLException {
		this.sqlMapClientTemplate.delete(SqlName.FpShopInformationSql.delete,id);
	}
	
	@SuppressWarnings("unchecked")	
	@Override
	public List<FpShopInformationDTO> queryList(FpShopInformationDTO fpShopInformation) throws SQLException {
		return this.sqlMapClientTemplate.queryForList(SqlName.FpShopInformationSql.queryList, fpShopInformation);
	}

	@Override
	public int queryListCount(FpShopInformationDTO fpShopInformation) throws SQLException {
		return (Integer) this.sqlMapClientTemplate.queryForObject(SqlName.FpShopInformationSql.queryListCount, fpShopInformation);
	}

	@Override
	public FpShopInformationDTO loadById(Integer id) throws SQLException {
		return  (FpShopInformationDTO)this.getSqlMapClientTemplate().queryForObject(SqlName.FpShopInformationSql.loadById,id);
	}

	@Override
	public Class<FpShopInformationDTO> getEntityClass() {
		return FpShopInformationDTO.class;
	}

	@Override
	public List<FpShopInformationDTO> queryCurdayInformations(
			FpShopInformationDTO fpShopInformation) throws SQLException {
		return this.sqlMapClientTemplate.queryForList(SqlName.FpShopInformationSql.queryCurdayInformations, fpShopInformation);
	}
 	
}